﻿using Helpers.Common;
using System;

namespace Helpers.Serialization
{
    [Serializable]
    public abstract class TupleSerializable
    {
        #region Overrided Methods

        /// <summary>
        /// Converts the value of the object to its equivalent string representation.
        /// </summary>
        /// <returns>This <typeparamref name="System.String"/></returns>
        public override string ToString()
        {
            return HelperCommon.ObjectToString(this);
        }

        #endregion
    }


    public class TupleOfStringBoolean : TupleSerializable
    {
        #region Properties

        /// <summary>
        /// The boolean component of the tuple.
        /// </summary>
        public bool BooleanValue { get; set; }
        /// <summary>
        /// The string component of the tuple.
        /// </summary>
        public string StringValue { get; set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public TupleOfStringBoolean() { }
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="stringValue">The string component of the tuple.</param>
        /// <param name="boolValue">The boolean component of the tuple.</param>
        public TupleOfStringBoolean(string stringValue, bool boolValue)
        {
            this.StringValue = stringValue;
            this.BooleanValue = boolValue;
        }

        #endregion
    }
}
